/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://github.com/mineadmin
 */
import type { MaFormItem } from '@mineadmin/form'
import hasAuth from '@/utils/permission/hasAuth.ts'
import MaDictRadio from '@/components/ma-dict-picker/ma-dict-radio.vue'
import { concat } from 'lodash-es'

export default function getFormItems(formType: 'add' | 'edit' = 'add', t: any, model: any): MaFormItem[] {
    

      return concat([
    { label: '设备型号', prop: 'device_model', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '设备型号'}) } },
    { label: '设备品牌', prop: 'device_brand', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '设备品牌'}) } },
    { label: '设备序列号', prop: 'device_sn', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '设备序列号'}) } },
    { label: '经度', prop: 'longitude', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '经度'}) } },
    { label: '纬度', prop: 'latitude', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '纬度'}) } },
    { label: '海拔高度', prop: 'altitude', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '海拔高度'}) } },
    { label: 'IP地址', prop: 'ip_address', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: 'IP地址'}) } },
    { label: '端口号', prop: 'port', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '端口号'}) } },
    { label: '密钥', prop: 'secret', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: '密钥'}) } },
    { label: 'MAC地址', prop: 'mac_address', render: 'input', renderProps: { placeholder: t('form.pleaseInput', { msg: 'MAC地址'}) } },
    { label: '最后在线时间', prop: 'last_online_time', render: 'DatePicker', renderProps: { placeholder: t('form.pleaseInput', { msg: '最后在线时间'}) }, mode: 'date', showTime: true },
    { label: '维护状态：1-正常，2-需要维护，3-维护中，4-报废', prop: 'maintenance_status', render: () => MaDictRadio, renderProps: { placeholder: t('form.pleaseInput', { msg: '维护状态：1-正常，2-需要维护，3-维护中，4-报废'}) }, itemProps: { rules: [
    { required: true, message: '请输入维护状态：1-正常，2-需要维护，3-维护中，4-报废' },
  ] } },
  ]);
}
